package com.imooc.myselfProj;

import com.sun.scenario.effect.impl.prism.PrCropPeer;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import javax.annotation.Resources;
import java.util.HashMap;

/**
 * @Author xxx
 * @className Part6_UEL
 * @description //TODO
 * @data 2024/10/14 13:34
 */
@SpringBootTest
public class Part6_UEL {

    @Autowired
    private RuntimeService runtimeService;

    @Autowired
    private TaskService taskService;


    @Test
    public void initProcessInstanceWithArgs() {
        //流程变量
        HashMap<String, Object> variable = new HashMap<>();
        variable.put("ZhiXingRe", "wukong");

        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcess_UEL_V1"
        ,"bKey002",variable);

        System.out.println("流程实例ID" + processInstance.getProcessDefinitionId());

    }

    //完成任务带参数，指定流程变量测试
    @Test
    public void completeTaskWithArgs() {

    }

    //启动流程实例带参数，使用实体类
    @Test
    public void initProcessInstanceWithClassArgs() {
    }

    //任务完成环节带参数，指定多个候选人
    @Test
    public void initProcessInstanceWithCandiDateArgs() {
    }


    //直接指定流程变量
    @Test
    public void otherArgs() {
    }


    @Test
    public void otherLocalArgs() {
    }


}
